package com.ge.modules.entity;

import com.baomidou.mybatisplus.annotations.TableName;
import com.ge.modules.api.apiDTO.TbUserDto;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 用户
 * </p>
 *
 * @author theodo
 * @since 2017-10-28
 */
@TableName("tb_user")
public class TbUser implements Serializable {
	private static final long serialVersionUID = 1L;

	//
	private Integer userId;
	//用户头像
	private String headPicture;
	//用户钱包(余额)
	private BigDecimal wallet;
	//电话号码(账号)
	private String mobile;
	//登录密码
	private String password;
	//积分
	private Integer integral;
	//真实姓名
	private String realname;
	//昵称
	private String nickname;
	//个性签名
	private String signature;
	//选择城市
	private String city;
	//订单消息编码
	private String orderNewsCode;
	//系统消息编码
	private String systemNewsCode;
	//资产消息编码
	private String assetNewsCode;
	//出生日期
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date birthday;
	//性别，0:女性，1:男性
	private Integer sex;
	//背景图片
	private String backgroundPicture;
	//0:未删除，1:已删除
	private Integer deleteType;
	//创建时间
	private Date createTime;
	//是否技师，0:否，1:是
	private Integer isTechnician;
	//用户类型 1用户 2技师 3店铺
	private Integer userType;

	public Integer getUserType() {
		return userType;
	}

	public void setUserType(Integer userType) {
		this.userType = userType;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getHeadPicture() {
		return headPicture;
	}

	public void setHeadPicture(String headPicture) {
		this.headPicture = headPicture;
	}

	/**
	 * 设置：用户钱包(余额)
	 */
	public void setWallet(BigDecimal wallet) {
		this.wallet = wallet;
	}
	/**
	 * 获取：用户钱包(余额)
	 */
	public BigDecimal getWallet() {
		return wallet;
	}
	/**
	 * 设置：电话号码(账号)
	 */
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	/**
	 * 获取：电话号码(账号)
	 */
	public String getMobile() {
		return mobile;
	}
	/**
	 * 设置：登录密码
	 */
	public void setPassword(String password) {
		this.password = password;
	}
	/**
	 * 获取：登录密码
	 */
	public String getPassword() {
		return password;
	}
	/**
	 * 设置：积分
	 */
	public void setIntegral(Integer integral) {
		this.integral = integral;
	}
	/**
	 * 获取：积分
	 */
	public Integer getIntegral() {
		return integral;
	}
	/**
	 * 设置：真实姓名
	 */
	public void setRealname(String realname) {
		this.realname = realname;
	}
	/**
	 * 获取：真实姓名
	 */
	public String getRealname() {
		return realname;
	}
	/**
	 * 设置：昵称
	 */
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	/**
	 * 获取：昵称
	 */
	public String getNickname() {
		return nickname;
	}
	/**
	 * 设置：个性签名
	 */
	public void setSignature(String signature) {
		this.signature = signature;
	}
	/**
	 * 获取：个性签名
	 */
	public String getSignature() {
		return signature;
	}
	/**
	 * 设置：选择城市
	 */
	public void setCity(String city) {
		this.city = city;
	}
	/**
	 * 获取：选择城市
	 */
	public String getCity() {
		return city;
	}
	/**
	 * 设置：订单消息编码
	 */
	public void setOrderNewsCode(String orderNewsCode) {
		this.orderNewsCode = orderNewsCode;
	}
	/**
	 * 获取：订单消息编码
	 */
	public String getOrderNewsCode() {
		return orderNewsCode;
	}
	/**
	 * 设置：系统消息编码
	 */
	public void setSystemNewsCode(String systemNewsCode) {
		this.systemNewsCode = systemNewsCode;
	}
	/**
	 * 获取：系统消息编码
	 */
	public String getSystemNewsCode() {
		return systemNewsCode;
	}
	/**
	 * 设置：资产消息编码
	 */
	public void setAssetNewsCode(String assetNewsCode) {
		this.assetNewsCode = assetNewsCode;
	}
	/**
	 * 获取：资产消息编码
	 */
	public String getAssetNewsCode() {
		return assetNewsCode;
	}
	/**
	 * 设置：出生日期
	 */
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	/**
	 * 获取：出生日期
	 */
	public Date getBirthday() {
		return birthday;
	}
	/**
	 * 设置：性别，0:女性，1:男性
	 */
	public void setSex(Integer sex) {
		this.sex = sex;
	}
	/**
	 * 获取：性别，0:女性，1:男性
	 */
	public Integer getSex() {
		return sex;
	}
	/**
	 * 设置：背景图片
	 */
	public void setBackgroundPicture(String backgroundPicture) {
		this.backgroundPicture = backgroundPicture;
	}
	/**
	 * 获取：背景图片
	 */
	public String getBackgroundPicture() {
		return backgroundPicture;
	}
	/**
	 * 设置：0:未删除，1:已删除
	 */
	public void setDeleteType(Integer deleteType) {
		this.deleteType = deleteType;
	}
	/**
	 * 获取：0:未删除，1:已删除
	 */
	public Integer getDeleteType() {
		return deleteType;
	}
	/**
	 * 设置：创建时间
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	/**
	 * 获取：创建时间
	 */
	public Date getCreateTime() {
		return createTime;
	}
	/**
	 * 设置：是否技师，0:否，1:是
	 */
	public void setIsTechnician(Integer isTechnician) {
		this.isTechnician = isTechnician;
	}
	/**
	 * 获取：是否技师，0:否，1:是
	 */
	public Integer getIsTechnician() {
		return isTechnician;
	}

	public TbUserDto toDto(){
		TbUserDto tbUserDto = new TbUserDto();
		tbUserDto.setSystemNewsCode(this.getSystemNewsCode());
		tbUserDto.setBackgroundPicture(this.getBackgroundPicture());
		tbUserDto.setUserType(this.getUserType());
		tbUserDto.setUserId(this.getUserId());
		tbUserDto.setHeadPicture(this.getHeadPicture());
		tbUserDto.setWallet(this.getWallet());
		tbUserDto.setMobile(this.getMobile());
		tbUserDto.setPassword(this.getPassword());
		tbUserDto.setIntegral(this.getIntegral());
		tbUserDto.setRealname(this.getRealname());
		tbUserDto.setNickname(this.getNickname());
		tbUserDto.setSignature(this.getSignature());
		tbUserDto.setCity(this.getCity());
		tbUserDto.setOrderNewsCode(this.getOrderNewsCode());
		tbUserDto.setAssetNewsCode(this.getAssetNewsCode());
		tbUserDto.setBirthday(this.getBirthday());
		tbUserDto.setSex(this.getSex());
		tbUserDto.setDeleteType(this.getDeleteType());
		tbUserDto.setCreateTime(this.getCreateTime());
		tbUserDto.setIsTechnician(this.getIsTechnician());
		return tbUserDto;
	}
}

